package cn.zzuzhm.spring.factory;

import java.util.HashMap;
import java.util.Map;

public class InstanceCarFactory {
	
	private Map<String,Car> map;
	
	public InstanceCarFactory(){
		map = new HashMap<String, Car>();
		map.put("Audi", new Car("Audi",300000));
		map.put("BMW", new Car("BMW",400000));
	}
	
	public Car getCar(String brand){
		Car car = new Car();
		car = map.get(brand);
		return car;
	}

}
